package com.springboot.idempotence.busi;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;

@Entity
public class Business {
    @Id
    private String busiId;
    private String busiName;
    private String busiSex;
    private Integer busiAge;
    private String busiEmail;
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date updateDate;
    private String state;

    public String getBusiId() {
        return busiId;
    }

    public void setBusiId(String busiId) {
        this.busiId = busiId;
    }

    public String getBusiName() {
        return busiName;
    }

    public void setBusiName(String busiName) {
        this.busiName = busiName;
    }

    public String getBusiSex() {
        return busiSex;
    }

    public void setBusiSex(String busiSex) {
        this.busiSex = busiSex;
    }

    public Integer getBusiAge() {
        return busiAge;
    }

    public void setBusiAge(Integer busiAge) {
        this.busiAge = busiAge;
    }

    public String getBusiEmail() {
        return busiEmail;
    }

    public void setBusiEmail(String busiEmail) {
        this.busiEmail = busiEmail;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "{" +
                "\"busiId\"'" + busiId + '\"' +
                ", \"busiName\":\"" + busiName + '\"' +
                ", \"busiSex\":\"" + busiSex + '\"' +
                ", \"busiAge\":" + busiAge +
                ", \"busiEmail\":\"" + busiEmail + '\"' +
                ", \"createDate\":\"" + createDate +
                ", \"updateDate\":\"" + updateDate +
                ", \"state\":\"" + state + '\"' +
                '}';
    }
}
